package com.tony.mapper.domain.po;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.tony.domain.enumerate.DeleteEnum;
import com.tony.domain.enumerate.EnableEnum;
import com.tony.domain.enumerate.SexEnum;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author tony
 * @date 2020/5/30 13:05
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "s_admin_user")
public class AdminUser implements Serializable {
    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 角色id
     */
    @TableField(value = "role_id")
    private Long roleId;

    /**
     * 名称
     */
    @TableField(value = "name")
    private String name;

    /**
     * 性别：1男，2女
     */
    @TableField(value = "sex")
    private SexEnum sex;

    /**
     * 登陆名称
     */
    @TableField(value = "login_name")
    private String loginName;

    /**
     * 密码
     */
    @TableField(value = "password")
    private String password;

    /**
     * 电话
     */
    @TableField(value = "phone")
    private String phone;

    /**
     * 电子邮箱地址
     */
    @TableField(value = "email")
    private String email;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private LocalDateTime createTime;

    /**
     * 创建人id
     */
    @TableField(value = "create_id")
    private Long createId;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private LocalDateTime updateTime;

    /**
     * 修改人id
     */
    @TableField(value = "update_id")
    private Long updateId;

    /**
     * 状态1：正常2：禁用
     */
    @TableField(value = "is_enable")
    private EnableEnum isEnable;

    /**
     * 删除状态1：正常2：删除
     */
    @TableLogic
    @TableField(value = "is_del")
    private DeleteEnum isDel;

    /**
     * 密码盐
     */
    @TableField(value = "salt")
    private String salt;

    /**
     * 头像
     */
    @TableField(value = "head_portrait")
    private String headPortrait;

    private static final long serialVersionUID = 1L;

    public static final String COL_ID = "id";

    public static final String COL_ROLE_ID = "role_id";

    public static final String COL_NAME = "name";

    public static final String COL_SEX = "sex";

    public static final String COL_LOGIN_NAME = "login_name";

    public static final String COL_PASSWORD = "password";

    public static final String COL_PHONE = "phone";

    public static final String COL_EMAIL = "email";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_CREATE_ID = "create_id";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_UPDATE_ID = "update_id";

    public static final String COL_IS_ENABLE = "is_enable";

    public static final String COL_IS_DEL = "is_del";

    public static final String COL_SALT = "salt";

    public static final String COL_HEAD_PORTRAIT = "head_portrait";
}